Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/Co2Severity.kt 4e15ef1c7f68f8c683fe8b7ff741a5167e154d2e (4e15ef1c) Text, 1.71 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ui.component

Tff7b72import T7ee787androidx.compose.ui.graphics.Color

T8b949e/**
* CO₂ severity levels based on concentration thresholds (ppm).
*
* Thresholds per design/issues/53:
* - Good: 0–1000 ppm
* - Stuffy: 1000–2000 ppm
* - Poor: 2000–5000 ppm
* - Unsafe: 5000–30000 ppm
* - Evacuate: 30000+ ppm
*/
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffMagicNumberTa5d6ff"Tb4b4b4)
Tff7b72enum Tff7b72class T56d364Co2SeverityTb4b4b4(Tff7b72val Te6edf3colorTb4b4b4: Te6edf3ColorTb4b4b4, Tff7b72val Te6edf3labelTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4{
Te6edf3GOODTb4b4b4(Te6edf3ColorTb4b4b4(T79c0ff0Te6edf3xFF4CAF50Tb4b4b4)Tb4b4b4, Ta5d6ff"Ta5d6ffGoodTa5d6ff"Tb4b4b4)Tb4b4b4,
Te6edf3STUFFYTb4b4b4(Te6edf3ColorTb4b4b4(T79c0ff0Te6edf3xFFFFC107Tb4b4b4)Tb4b4b4, Ta5d6ff"Ta5d6ffStuffyTa5d6ff"Tb4b4b4)Tb4b4b4,
Te6edf3POORTb4b4b4(Te6edf3ColorTb4b4b4(T79c0ff0Te6edf3xFFFF9800Tb4b4b4)Tb4b4b4, Ta5d6ff"Ta5d6ffPoorTa5d6ff"Tb4b4b4)Tb4b4b4,
Te6edf3UNSAFETb4b4b4(Te6edf3ColorTb4b4b4(T79c0ff0Te6edf3xFFF44336Tb4b4b4)Tb4b4b4, Ta5d6ff"Ta5d6ffUnsafeTa5d6ff"Tb4b4b4)Tb4b4b4,
Te6edf3EVACUATETb4b4b4(Te6edf3ColorTb4b4b4(T79c0ff0Te6edf3xFFB71C1CTb4b4b4)Tb4b4b4, Ta5d6ff"Ta5d6ffEvacuateTa5d6ff"Tb4b4b4)Tb4b4b4,
Tb4b4b4;

Tff7b72companion Tff7b72object Tb4b4b4{
T8b949e/** Returns the [Co2Severity] for the given [ppm] value, or null if ppm is 0 or negative. */
Tff7b72fun Td2a8fffromPpmTb4b4b4(Te6edf3ppmTb4b4b4: Tffa657IntTb4b4b4)Tb4b4b4: Te6edf3Co2Severity? Tff7b72= Tff7b72when Tb4b4b4{
Te6edf3ppm Tff7b72<Tff7b72= T79c0ff0 Tff7b72-Tff7b72> Tff7b72null
Te6edf3ppm Tff7b72< T79c0ff1T79c0ff0T79c0ff0T79c0ff0 Tff7b72-Tff7b72> Te6edf3GOOD
Te6edf3ppm Tff7b72< T79c0ff2T79c0ff0T79c0ff0T79c0ff0 Tff7b72-Tff7b72> Te6edf3STUFFY
Te6edf3ppm Tff7b72< T79c0ff5T79c0ff0T79c0ff0T79c0ff0 Tff7b72-Tff7b72> Te6edf3POOR
Te6edf3ppm Tff7b72< T79c0ff3T79c0ff0T79c0ff0T79c0ff0T79c0ff0 Tff7b72-Tff7b72> Te6edf3UNSAFE
Tff7b72else Tff7b72-Tff7b72> Te6edf3EVACUATE
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.05s